package cn.bugstack.middleware.dynamic.thread.pool.sdk.registry;

import cn.bugstack.middleware.dynamic.thread.pool.sdk.domain.model.entity.ThreadPoolAlarmEntity;
import cn.bugstack.middleware.dynamic.thread.pool.sdk.domain.model.entity.ThreadPoolConfigEntity;

import java.util.List;

/**
 * @author XiRui
 * @description 注册中心接口
 * @create 2024-11-12 16:21
 */
public interface IRegistry {

    void reportThreadPool(List<ThreadPoolConfigEntity> threadPoolEntities);

    void reportThreadPoolConfigParameter(ThreadPoolConfigEntity threadPoolConfigEntity);
    
    /**
     * 保存告警配置
     * @param alarmEntity 告警配置实体
     */
    void saveAlarmConfig(ThreadPoolAlarmEntity alarmEntity);
    
    /**
     * 获取告警配置
     * @param appName 应用名称
     * @param threadPoolName 线程池名称
     * @return 告警配置实体
     */
    ThreadPoolAlarmEntity getAlarmConfig(String appName, String threadPoolName);
}
